package com.oro.util;

import java.util.Map;

public class Pair<K, V> implements Map.Entry<K, V> {

	private K key;
	private V value;

	public Pair() {
		super();
	}

	public Pair(K key, V value) {
		this.key = key;
		this.value = value;
	}

	public boolean equals(Pair<K, V> p) {
		return p.getKey().equals(this.getKey());
	}

	@Override
	public K getKey() {
		return key;
	}

	@Override
	public V getValue() {
		return value;
	}

	public void setKey(K key) {
		this.key = key;
	}

	@Override
	public V setValue(V value) {
		this.value = value;
		return this.value;
	}

	@Override
	public String toString() {
		return "[" + key.toString() + ", " + value.toString() + "]";
	}

}
